package com.baitengsoft.patentapimonitor.api.dao;

import com.baitengsoft.patentapimonitor.api.entity.WebPlatformareaEntity;
import com.baitengsoft.patentapimonitor.api.model.RptPatentDataAreaInfo;
import com.baitengsoft.patentapimonitor.api.model.WebBaseAnalysisInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * QEK
 * 平台的区域
 */
@Mapper
@Repository
public interface WebPlatFormAreaDao extends BasetkRepository<WebPlatformareaEntity> {
    //查询地区
    WebPlatformareaEntity selectAreaById(Integer id);
    //根据区域的id删除该区域
    int deleteAreaById(Integer id);
    //根据平台id新增区域
    int addAreaByPlatformId(WebPlatformareaEntity entity);
    //修改区域
    int updateArea(WebPlatformareaEntity entity);
    //查询某一级平台下属区域
    List<WebPlatformareaEntity> selectAreaByPlatformId(Integer platformId);
    //根据平台ID获取区域ID
    List<Integer> selectAreaIdByPlatFormId(Integer platformId);

    Integer upPlatformArea(Integer platformId);

    int selectSortByPlatformId(@Param("platformid") Integer platformid, @Param("sort") Integer sort);
}
